﻿@model Zatify.WebUI.Models.BusinessProfileDescriptionViewModel
@{
    ViewBag.Title = "Description";
    ViewBag.ContentTitle = "Description";
    Layout = "~/Views/Shared/_ContentLayout.cshtml";
}
@section Scripts
{
    <script type="text/javascript">

        $(document).ready(function () {

            $("#imageUpload").change(function () {

                $("#imageName").text("Image file: " + $(this).val());
                $("#imageName").css("visibility", "visible");
            });

            $("a.picture_upload_btn").click(function () { $("#imageUpload").click(); });

        });
    
    </script>
}
<div class="business_interface_area">
    @using (Html.BeginForm("Description", "BusinessProfile", FormMethod.Post, new { enctype = "multipart/form-data" }))
    {
        <div class="business_description_content">
            <div class="picture_upload_left">
                <div class="current_picture">
                <div style="margin: auto 0; width: 150px; height: 170px;">
                    <img alt="" src="@Url.Action("GetCurrentBusinessPhoto", "BusinessProfile", new { h = 340, w = 300 })" />
                </div>
                </div>
                <div class="upload_pic">
                    <input type="file" id="imageUpload" name="imageUpload" style="visibility: hidden" />
                    <a href="#" class="picture_upload_btn"></a>
                </div>
                <div class="line" style="width: 100%;">
                    <label class="label_text">
                    </label>
                    <span id="imageName" style="visibility: hidden; height: 40px; float: left; font-weight: bold;">
                    </span>
                </div>
            </div>
            <div class="description_business_right">
                <h5>
                    Description</h5>
                @Html.TextAreaFor(m => m.Description, new { @class = "business_description_textarea" })
                <input type="submit" value="Save" class="blue_btn" style="margin-left: 0px;" />
            </div>
        </div>
    }
    <div class="clearfix">
    </div>
</div>
